Can't have 'continue' outside of loop

You attempted to use the continue statement outside of a loop. The continue statement can be used only within the body of a:

To correct this error

  • Make sure the continue statement appears within the body of a:

    • do-while loop,

    • while loop,

    • for loop,

    • for/in loop.

See Also